//
//  SearchModel.m
//  Taste
//
//  Created by 徐昊 on 16/9/14.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "SearchModel.h"
#import "SearchRes.h"
@implementation SearchModel

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"res"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SearchRes *res = [SearchRes modelWithDic:dic];
            [array addObject:res];
        }
        _res = array;
    }
}

+ (NSDictionary *)objectClassInArray{
    return @{@"res" : [SearchRes class]};
}
@end





